# 导包
import requests

# 发送请求
response = requests.post(url="http://tpshop-test.itheima.net/index.php?m=Home&c=User&a=do_login",
                         headers={"Content-Type": "application/x-www-from-urlencoded"},
                         data={"username": "13800138006", "password": "123456", "verify_code": "8888"})  # 发送tpshop登陆请求
print(type(response.text))  # 打印结果
print(type(response.json()))  # 打印json结果)

import requests

response = requests.post(url="http://tpshop-test.itheima.net/index.php?m=Home&c=User&a=do_login",
                         headers={"Content-Type": "application/x-www-from-urlencoded"},
                         data="username=13800138006&password=123456&verify_code=8888")
print(response.text)
print(response.json())
